#ifndef DATAMODEL_H
#define DATAMODEL_H

#include <QAbstractTableModel>
#include <QVector>

struct TableRow
{
    QString month;
    int days;

    TableRow(const QString name, int days)
    {
        month = name;
        this ->days = days;
    }
    TableRow() {}
};

class DataModel : public QAbstractTableModel
{
    Q_OBJECT
    QVector<TableRow> m_data;
public:
    explicit DataModel(QObject *parent = 0);

    int rowCount(const QModelIndex &parent) const;
    int columnCount(const QModelIndex &parent) const;
    QVariant data(const QModelIndex &index, int role) const;
signals:

public:
    void filterChanged(int year_time);

private:
    int year_time;

};

#endif // DATAMODEL_H
